<template>
  <div>
    <nav-bar title="意见反馈"/>
    <div class="content_scroll">
      <h3>请选择问题类型:</h3>
      <ul>
        <li 
          v-for="(item, index) in list" 
          :key="index"
          :class="[currentIndex === index? 'list_active': '']"
          @click="itemClick(index)">
          {{item}}
        </li>
      </ul>
      <div class="input_box">
        <textarea name="value" id="value" v-model="value" placeholder="欢迎您对我们提出各种意见！"></textarea>
        <div class="problem_btn">
          <img src="../../../assets/img/server/ic_problem.png" alt="">
          <span>如何建议</span>
        </div>
      </div>
      <div class="submit_btn">提交</div>
    </div>
  </div>
</template>

<script>
import NavBar from '../../../components/common/navbar/NavBar.vue'
export default {
  components: {
    NavBar
  },
  data() {
    return {
      list: ['APP建议', 'APP故障', '游戏相关', '其他'],
      currentIndex: 0,
      value: '',
    }
  },
  methods: {
    itemClick(index) {
      this.currentIndex = index
    }
  },
}
</script>

<style lang="less" scoped>
.content_scroll {
  box-sizing: border-box;
  padding: 0 .426667rem;
  font-size: .32rem;
  h3 {
    margin: 0;
    padding: .4rem 0 .666667rem;
    font-size: .4rem;
    font-weight: bold;
    font-size: #222222;
  }
  ul {
    color: #666;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    li {
      width: 2.053333rem;
      height: .72rem;
      background: #ccc;
      border-radius: .36rem;
      text-align: center;
      line-height: .72rem;
    }
    .list_active {
      background: #ff5543;
      color: #fff;
    }
  }
  .input_box {
    position: relative;
    textarea {
      box-sizing: border-box;
      padding: .4rem .266667rem;
      margin-top: .4rem;
      width: 9.146667rem;
      height: 4.666667rem;
      border: 0;
      font-size: .32rem;
      font-weight: 500;
    }
    .problem_btn {
      position: absolute;
      bottom: .266667rem;
      right: .266667rem;
      display: flex;
      align-items: center;
      img {
        width: .373333rem;
        height: .373333rem;
        margin-right: .133333rem;
      }
      span {
        color: #5361FE;
        font-size: .32rem;
        font-weight: 500;
      }
    }
  }
  .submit_btn {
    width: 9.146667rem;
    height: 1.04rem;
    background: #FF5543;
    border-radius: .52rem;
    text-align: center;
    line-height: 1.04rem;
    color: #fff;
    font-size: .426667rem;
    margin-top: 1.333333rem;
  }
}
</style>